The present invention relates to a method for correcting scanning errors, wherein picture elements of a document are successively scanned at a scanning speed along a scanning direction. During the scanning operation image data with a scanning resolution in scanning direction are generated.
During scanning, either the document to be scanned or the scanning device is moved, see for example, flat-bed scanners or scanners having a document feeder. The relative movement between the document and the scanning device is mostly generated with the help of motors, in particular stepper motors. The document is scanned in a scanning direction which corresponds to the direction of the relative movement between the document and the scanning device. This scanning direction is also referred to as main scanning direction. Lines are scanned along a sub-scanning direction which is transverse to the main scanning direction. The picture elements of one line are either scanned simultaneously, e.g. with the help of a line of photodiodes, or also successively, e.g. by using a laser scanner having a rotating polygon mirror.
By resolution one understands the number of picture elements per unit of length. Internationally, one inch is used as reference unit of length, i.e. 25.4 mm. The resolution used for scanning is strictly determined in the sub-scanning direction when using a photodiode-line. In the main scanning direction the resolution depends inter alia on the quantity of the relative velocity between the document to be scanned and the scanning device.
In known scanning methods the relative velocity between the document to be scanned and the scanning device is factory-determined. This is effected, for example, by small manufacturing tolerances or by adjustment. Scanning errors are avoided by means of lens systems, e.g. by means of f-xcex8-lenses, or by appropriate measures regarding the control of the scanning operation.
It is the object of the invention to provide a simple method for correcting scanning errors. Further, a data processing equipment suitable for performing the method, a program suitable for performing the method as well as a text recognition system are to be provided, in which the method is applied.
The object concerning the method is solved by a method having the process steps indicated in claim 1. Embodiments are provided in the subclaims.
The invention is based on the recognition that a constant scanning speed is guaranteed for the individual scanning devices throughout the entire image to be scanned. However, the scanning speeds of different scanning devices differ from one another. This is, for example, due to aging and wear of mechanical components as well as to tolerances during the manufacturing of the scanning devices. However, the same methods are used for processing the image data generated during the scanning operation. Thus, also the scanning speed has a decisive influence on the scanning errors.
Therefore, in the method according to the invention, after the scanning operation, scanning errors are eliminated dependent on the deviation of the scanning speed from a required scanning speed. By this measure the scanning errors which are to be traced back to a different scanning speed are eliminated. Even in the case of different scanning speeds between different scanning devices the same images are at last represented by the image data. In the case of further processing by using the same software, the same results are obtained.
In particular, if the document is moved during the scanning operation, differences between the scanning speeds of various similarly structured scanning devices cannot be avoided. For example, the coefficient of friction of transport rolls, which act on the surface of the document to be scanned, varies time-dependently. By means of the method according to the invention scanning errors, which can be traced back to such causes, can be compensated.
In one embodiment of the method according to the invention, the image data are processed such that the image which is represented by the image data is compressed or stretched in the direction of scanning. If the document has been scanned too fast due to a too high relative velocity between the document and the scanning device, the image has to be stretched. If the document, on the other hand, has been scanned too slow, the image represented has to be compressed. For compressing and stretching, respectively, the methods known from the image processing technology are used. Compressing and stretching, however, can also be done by inserting or deleting lines, respectively, e.g. each tenth line is deleted.
In another embodiment, the resolution of the image represented by the image data is varied. When varying the resolution, the image data themselves remain unchanged. This is a very simple possibility of eliminating the scanning errors which are due to the difference between the actual scanning speed and the required scanning speed. The resolution is a parameter which shall apply to the entire image to be scanned. Consequently, only one parameter has to be varied in order to eliminate the scanning errors which have arisen during the entire scanning operation. Changing the value for the resolution is a very reliable way of eliminating all imaging errors if the scanning speed is constant during the scanning of the entire image and only has different values between different scanning devices.
In one embodiment, the resolution is varied by means of a correction factor which is a measure of the difference between the length of the document in scanning direction and the length in scanning direction of the image represented by the image data with scanning resolution. In a further embodiment, the correction factor is calculated according to the following formula:
KF=LB/L
wherein KF is the correction factor,
L is the length of the document in scanning direction, and
LB is the length of the image represented by the image data in scanning direction. The correction factor KF can be calculated by a single division operation and thus in a simple manner. The altered value for the resolution results from multiplying the correction value KF by the scanning resolution. The length LB is directly connected with the scanning speed.
If the scanning speed is low, more picture elements are scanned. The length LB is comparatively high. According to the above-indicated formula the correction factor KF becomes greater than one in this case. By increasing the resolution on the basis of the high correction factor KF it is achieved that the length in scanning direction of the image represented by the image data is reduced with the corrected resolution and corresponds to the length of the document being scanned. The scanning error resulting from the deviation of the required scanning speed from the actual scanning speed has been corrected.
If the length LB of the image represented by the image data in scanning direction with scanning resolution is smaller than the length L of the document, a correction factor KF smaller than one results. The corrected resolution is thus smaller than the scanning resolution. By decreasing the resolution it is achieved that the length in scanning direction of the image represented by the image data is increased and corresponds to the length of the document being scanned. The scanning error due to the deviation of the required scanning speed from the actual scanning speed has been corrected.
The length L of the document to be scanned is, for example, entered by an operator or is determined by means of an appropriate method. Use is made of methods for determining the length of the entire document to be scanned or the length of a marking given on the document to be scanned. A simple way of determining the length of the document is to estimate the length on the basis of the length of the image represented by the image data in scanning direction. In doing so from predetermined lengths for the document the one length is chosen which deviates least from the length of the scanned image in scanning direction and with scanning resolution.
In one embodiment of the method according to the invention the image data free of scanning errors are processed by means of a method for recognizing characters. For carrying out the recognition method the characters which are to be recognized are searched for at predetermined length coordinates. In this embodiment, the recognition rate can considerably be increased since the recognition method used is sensitive to deviations of the characters to be recognized from their predetermined positions. A high recognition rate is only guaranteed if the characters to be recognized are accurately positioned at their predetermined coordinates. This can be achieved by correcting the scanning errors which are due to a deviation of the actual scanning speed from the required scanning speed.
Further, the invention relates to a data processing equipment for correcting scanning errors, a text recognition device as well as a program for correcting scanning errors. In the data processing equipment according to the invention and in the text recognition device according to the invention the method according to the invention or its embodiments are performed. The program, too, serves for performing the method according to the invention or its embodiments. Thus, the above-mentioned technical effects shall also apply to the data processing equipment, the text recognition device and the program.